43d9b6
@@ -1118,6 +1118,7 @@
public class TimerServiceImpl implements TimerService, Service<TimerService> {
         public void afterCompletion(int status) {
             if (status == Status.STATUS_COMMITTED) {
                 ROOT_LOGGER.debug("commit timer creation: " + this.timer);
+                timers.put(timer.getId(), timer);
 
                 registerTimerResource(timer.getId());
                 TimerState timerState = this.timer.getState();
@@ -1130,7 +1131,6 @@
public class TimerServiceImpl implements TimerService, Service<TimerService> {
                         this.timer.scheduleTimeout(true);
                         break;
                 }
-                timers.put(timer.getId(), timer);
             } else if (status == Status.STATUS_ROLLEDBACK) {
                 ROOT_LOGGER.debug("Rolling back timer creation: " + this.timer);
                 this.timer.setTimerState(TimerState.CANCELED);
